package org.example;

public class CopyTest {

   public static void main(String[] args){

       String filePath = "D:\\大学学校资料\\大三上学校资料\\Java学习索引.md";
       int lastBackslashIndex = filePath.lastIndexOf('\\');
       String fileName = filePath.substring(lastBackslashIndex + 1);

       System.out.println("文件名: " + fileName);

   }


}
